<?php

namespace App\Kits\Middleware;

use Illuminate\Http\Request;

/**
 * 验证是否存在某个权限
 * 1、需要支持 App\Kits\Services\LibAuthService功能
 * Class CheckForAnyScopeMiddleware
 * @package App\Kits\Middleware;
 */
class CheckForAnyScopeMiddleware
{

    public function handle(Request $request, $next, ...$scopes)
    {

//        try {
//            foreach ($scopes as $scope) {
//                if ($request->user()->tokenCan($scope)) {
//                    return $next($request);
//                }
//            }
//            throw new NotAuthException();
//        } catch (\Exception $exception) {
//            return BaseException::exceptionHandle($request, $exception);
//        }
    }
}
